﻿Public Class _Default
    Inherits System.Web.UI.Page

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

        btn_close.Visible = False
        gridzone.Visible = False


        If Request.Params("tagname") = "" Then
            GridView1.DataSourceID = "mercedesbenzdatasource"
        Else
            GridView1.DataSourceID = "mercedesbenzdatasource0"
        End If

        'this adds information to the default page textbox

    End Sub

    Protected Sub Button1_Click(ByVal sender As Object, ByVal e As EventArgs) Handles Button1.Click
        Dim url As String = "Default.aspx?tagname=" & TextBox1.Text
        Response.Redirect(url)
    End Sub



    Protected Sub btn_showgrid_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btn_showgrid.Click

        gridzone.Visible = True
        btn_showgrid.Visible = False
        btn_close.Visible = True

    End Sub

    Protected Sub btn_close_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btn_close.Click
        gridzone.Visible = False
        btn_showgrid.Visible = True
        btn_close.Visible = False
    End Sub
End Class